﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ACPanel/AdminPage.master" AutoEventWireup="true"
    CodeFile="QLLienlac.aspx.cs" Inherits="ACPanel_NodeCauHinh_QLLienlac" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <!-- Add / Update Category -->
            <div class="row">
                <div class="col-lg-12">
                    <h1>
                        Quản lý danh sách liên lạc</h1>
                    <ol class="breadcrumb">
                        <li><i class="fa fa-dashboard"></i> Bảng điều khiển</li>
                        <li class="active"><i class="fa fa-table"></i> Quản lý danh sách liên lạc</li>
                    </ol>
                </div>
                <div class="col-lg-12">
                    <div class="row">
                        <div class="col-md-6 col-sm-12">
                            <div class="form-group">
                                <p>
                                    <label>Chọn nhóm liên lạc</label>
                                    <asp:DropDownList runat="server" CssClass="form-control" ID="ddlNhomlienlac" AutoPostBack="True"/>
                                </p>
                                <p>
                                    <label>Tên địa chỉ liên lạc</label>
                                    <asp:TextBox CssClass="form-control" runat="server" ID="tbTenlienlac"></asp:TextBox>
                                </p>             
                                <p>
                                    <label>Giá trị</label>
                                    <asp:TextBox CssClass="form-control" runat="server" ID="tbGiatri"></asp:TextBox>
                                </p>                                               
                            </div>
                        </div>
                        <div class="col-md-6 col-sm-12">
                            <div class="form-group">
                                <p>
                                    <label>Tên nhân viên phụ trách</label>
                                    <asp:TextBox CssClass="form-control" runat="server" ID="tbTennhanvien"></asp:TextBox>
                                </p>
                                <p>
                                    <label>Sử dụng</label>
                                    <asp:CheckBox CssClass="form-control" runat="server" ID="cbTrangThai" ToolTip="Trạng thái sử dụng" />
                                </p>
                                <p>
                                    <button type="reset" class="btn btn-default">Xóa</button>
                                    <asp:Button runat="server" CssClass="btn btn-primary" ID="Button1" Text="Thêm vào"
                                        OnClick="btnThemvao_OnClick" /></p>
                                <p>
                                    <asp:Literal runat="server" ID="litResult" EnableViewState="False"></asp:Literal>
                                </p>
                            </div>
                        </div>
                    </div>
                    <div class="panel panel-primary">
                        <div class="panel-heading">
                            <h3 class="panel-title">
                                <i class="fa fa-table"></i> Danh sách địa chỉ liên lạc</h3>
                        </div>
                        <div class="panel-body">
                            <asp:GridView CssClass="table table-bordered" ID="gv" DataKeyNames="Id" runat="server"
                                CellPadding="4" ForeColor="#333333" GridLines="None" PageSize="10" AllowPaging="true"
                                PagerSettings-Position="TopAndBottom" OnPageIndexChanging="gv_PageIndexChanging"
                                PagerSettings-PageButtonCount="5" AllowSorting="true" OnSorting="gv_Sorting" OnRowEditing="gv_OnRowEditing"
                                OnRowCancelingEdit="gv_OnRowCancelingEdit" OnRowUpdating="gv_OnRowUpdating" OnRowDataBound="gv_OnRowDataBound"
                                EmptyDataText="Chưa cập nhật dữ liệu" AutoGenerateEditButton="True" AutoGenerateColumns="False">
                                <Columns>
                                    <asp:TemplateField HeaderText="Delete">
                                        <ItemTemplate>                                            
                                            <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl='<%# "~/ACPanel/NodeCauHinh/DeleteNhomlienlac.aspx?" + "Id=" + Eval("Id") %>'><i class="fa fa-eraser"></i></asp:HyperLink>                                            
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>                                
                                <Columns>
                                    <asp:TemplateField HeaderText="Id">
                                        <ItemTemplate>
                                            <asp:Label runat="server" Text='<%# Eval("Id") %>' ID="lbId"></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Nhóm liên lạc">
                                        <ItemTemplate>
                                            <asp:Label runat="server" Text='<%# Eval("IdNhomlienlac") %>' ID="lbIdNhomlienlac" Visible="False"></asp:Label>
                                            <asp:DropDownList CssClass="form-control" runat="server" ID="ddlNhomlienlac_gv" />
                                        </ItemTemplate>
                                        
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Ten">
                                        <ItemTemplate>
                                            <%# Eval("Ten") %>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox CssClass="form-control" runat="server" ID="tbTen" Text='<%# Eval("Ten") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Giá trị">
                                        <ItemTemplate>
                                            <%# Eval("GiaTri")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox CssClass="form-control" runat="server" ID="tbGiatri" Text='<%# Eval("GiaTri") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Nhân viên">
                                        <ItemTemplate>
                                            <%# Eval("TacGia")%>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:TextBox CssClass="form-control" runat="server" ID="tbTacgia" Text='<%# Eval("TacGia") %>'></asp:TextBox>
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="NgayCapNhat" HeaderText="NgayCapNhat" />
                                    <asp:TemplateField HeaderText="Trạng thái">
                                        <ItemTemplate>
                                            <%# Eval("TrangThai") %>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <asp:CheckBox runat="server" ID="cbTrangthai" Checked='<%# Eval("TrangThai") %>'/>
                                        </EditItemTemplate>
                                    </asp:TemplateField>                                    
                                </Columns>
                                
                                <AlternatingRowStyle BackColor="White" />
                                <FooterStyle BackColor="#d02027" Font-Bold="True" ForeColor="Black" />
                                <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="Black" />
                                <PagerStyle CssClass="phan-trang" BackColor="#428bca" ForeColor="#ffffff" HorizontalAlign="Center" />
                                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" VerticalAlign="Middle" Wrap="True" />
                                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                                <PagerSettings Mode="NumericFirstLast"></PagerSettings>
                            </asp:GridView>
                        </div>
                    </div>
                </div>
            </div>
            <!-- end Add / Update Loai phuong tien -->
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
